package com.solotiger.douban.biz.api;

import com.solotiger.douban.biz.api.base.BaseApi;
import com.solotiger.douban.biz.model.movie.SubjectResult;
import com.solotiger.douban.biz.service.MovieService;
import com.solotiger.douban.common.GlobalContants;

import io.reactivex.Observable;

/**
 * 电影API
 */
public class MovieApi extends BaseApi {
    protected static final MovieService service = getRetrofit().create(MovieService.class);

    /**
     * 正在热映
     *
     * @return
     */
    public static Observable<SubjectResult> getMovieInTheaters(int count) {
        return service.getMovieInTheaters(count);
    }

    /**
     * 正在热映
     *
     * @return
     */
    public static Observable<SubjectResult> getMovieComingsoon(int start, int count) {
        return service.getMovieComing(GlobalContants.API_KEY, start, count);
    }

    /**
     * top250
     *
     * @return
     */
    public static Observable<SubjectResult> getMovieTop250(int start, int count) {
        return service.getMovieTop250(GlobalContants.API_KEY, start, count);
    }
}
